<?php

Yii::import('application.modules.events.models._base.BaseEvent');

class Event extends BaseEvent
{
	public static function model($className=__CLASS__) {
		return parent::model($className);
	}

	public static function webSearch($keyword){
		$criteria = new CDbCriteria();
		$criteria->select = 'id,title,alias,image,description,created';
		$criteria->addSearchCondition('title', $keyword,true,'OR');
		$criteria->addSearchCondition('content', $keyword,true,'OR');
		$criteria->order = 'created DESC';
		return self::model()->findAll($criteria);
	}
}